#include <iostream>

class HeapOnly
{
public:
	static HeapOnly* CreateObject(int x = 0)
	{
		return new HeapOnly(x);
	}
private:
	HeapOnly(int x = 0):_x(x)
	{}
	int _x;

	HeapOnly(const HeapOnly&) = delete;
};

// int main()
// {
// 	HeapOnly* ptr = HeapOnly::CreateObject(1);

// 	return 0;
// }


class heap
{
public:
	~heap(){}
	static heap* Get()
	{
		return new heap;
	} 

private:
	heap(){}
	heap(const heap&) = delete;
	heap& operator=(const heap&) = delete;
};

int main()
{
	heap* p1 = heap::Get();
	delete p1;
}